<?php

namespace app\common\model\user;

use app\common\model\Model;
use app\common\model\user\resume\Study;
use app\common\model\user\resume\Work;
use traits\model\SoftDelete;

class Resume extends Model
{
    use SoftDelete;

    const JOB_STATUS = [
        ['name' => '在职', 'value' => 1],
        ['name' => '离职', 'value' => 2],
    ];

    const EDUCATION = [
        ['name' => '专科', 'value' => 1],
        ['name' => '本科', 'value' => 2],
        ['name' => '硕士', 'value' => 3],
        ['name' => '博士', 'value' => 4],
    ];

    // 表名
    protected $name = 'user_resume';

    public function work()
    {
        return $this->hasMany(Work::class, 'user_id', 'user_id');
    }

    public function study()
    {
        return $this->hasMany(Study::class, 'user_id', 'user_id');
    }
}
